package com.ruoyi.system.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.system.domain.ZtfVideoTable;
import com.ruoyi.system.domain.dto.ZtfAppVideoTableDTO;
import com.ruoyi.system.result.PageResult;
import com.ruoyi.system.service.IZtAppfVideoTableService;
import com.ruoyi.system.service.IZtfVideoTableService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 【请填写功能名称】Controller
 * 
 * @author ruoyi
 * @date 2025-05-30
 */
@RestController
@RequestMapping("app/system/table")
@Api(tags = "app视频相关接口")
public class ZtfAppVideoTableController extends BaseController
{
    @Autowired
    private IZtAppfVideoTableService ztAppVideoTableService;

    /**
     * 查询【请填写功能名称】列表
     */
//    @PreAuthorize("@ss.hasPermi('system:table:list')")
    @GetMapping("/list")
    @ApiOperation("视频列表")
    public R<PageResult> list(ZtfAppVideoTableDTO ztfAppVideoTableDTO)
    {
        PageResult pageResult  = ztAppVideoTableService.selectZtfVideoTableList(ztfAppVideoTableDTO);
        return R.ok(pageResult);

//    /**
//     * 导出【请填写功能名称】列表
//     */
//    @PreAuthorize("@ss.hasPermi('system:table:export')")
//    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, ZtfVideoTable ztfVideoTable)
//    {
//        List<ZtfVideoTable> list = ztfVideoTableService.selectZtfVideoTableList(ztfVideoTable);
//        ExcelUtil<ZtfVideoTable> util = new ExcelUtil<ZtfVideoTable>(ZtfVideoTable.class);
//        util.exportExcel(response, list, "【请填写功能名称】数据");
//    }
//
//    /**
//     * 获取【请填写功能名称】详细信息
//     */
////    @PreAuthorize("@ss.hasPermi('system:table:query')")
//    @GetMapping(value = "/{id}")
//    @ApiOperation("获取视频详情")
//    public AjaxResult getInfo(@PathVariable("id") String id)
//    {
//        return success(ztfVideoTableService.selectZtfVideoTableById(id));
//    }
//
//    /**
//     * 新增【请填写功能名称】
//     */
//    @PreAuthorize("@ss.hasPermi('system:table:add')")
//    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
//    @PostMapping
//    @ApiOperation("视频新增")
//    public AjaxResult add(@RequestBody ZtfVideoTable ztfVideoTable)
//    {
//       //生成视频id
//        ztfVideoTable.setId(IdUtils.simpleUUID());
//        return toAjax(ztfVideoTableService.insertZtfVideoTable(ztfVideoTable));
//    }
//
//    /**
//     * 修改【请填写功能名称】
//     */
//    @PreAuthorize("@ss.hasPermi('system:table:edit')")
//    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
//    @PutMapping
//    @ApiOperation("视频修改")
//    public AjaxResult edit(@RequestBody ZtfVideoTable ztfVideoTable)
//    {
//        return toAjax(ztfVideoTableService.updateZtfVideoTable(ztfVideoTable));
//    }
//
//    /**
//     * 删除【请填写功能名称】
//     */
//    @PreAuthorize("@ss.hasPermi('system:table:remove')")
//    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
//	@DeleteMapping("/{ids}")
//    @ApiOperation("删除视频")
//    public AjaxResult remove(@PathVariable String[] ids)
//    {
//        return toAjax(ztfVideoTableService.deleteZtfVideoTableByIds(ids));
    }
}
